package br.com.afi.util.managerEmail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * Autenticador de SMTP implementado para utilização em {@link ManagerEmail}.
 * 
 * @author André de Fontana Ignacio
 * @version 1.0
 */
public class EmailAuthenticator extends Authenticator
{
	private String user;
	private String pass;

	/**
	 * Construtor
	 * 
	 * @param user Usuário
	 * @param pass Senha
	 */
	public EmailAuthenticator( String user, String pass )
	{
		this.user = user;
		this.pass = pass;
	}

	public PasswordAuthentication getPasswordAuthentication()
	{
		return new PasswordAuthentication( user, pass );
	}
}
